﻿@{
    ViewBag.Title = "Open_Tree";
    string rootid = new Business.Platform.Dictionary().GetIDByCode("FlowTypes").ToString();
}
<form id="form1">
    <div id="tree"></div>
</form>
<script type="text/javascript">
    var AppID = '@Request.QueryString["appid"]';
    var iframeid = '@Request.QueryString["iframeid"]';
    var openerid = '@Request.QueryString["openerid"]';
    var roadTree = null;
    $(function ()
    {
        roadTree = new RoadUI.Tree({ id: "tree", path: top.rootdir + "/Dict/Tree1?root=@rootid", refreshpath: top.rootdir + "Dict/TreeRefresh", onclick: openUrl });
    });
    function openUrl(json)
    {
        parent.frames[1].location = "Open_List?typeid=" + json.id + "&appid=" + AppID + "&iframeid=" + iframeid + "&openerid=" + openerid;
    }
    function reLoad(id)
    {
        roadTree.refresh(id);
    }
</script>
